package com.xpgk.mvc.bstockHandover;

import com.jfinal.log.Log;
import com.xpgk.annotation.Table;
import com.xpgk.mvc.base.BaseModel;
import com.xpgk.mvc.codeSet.Code;
import com.xpgk.mvc.productSet.Product;


/**
 * 库存交接明细表
 */
@SuppressWarnings("unused")
@Table(tableName = StockTransfer.table_name)
public class StockTransfer extends  BaseModel<StockTransfer>{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 4200461421873399768L;

	private static final Log log = Log.getLog(StockTransfer.class);

	public static final StockTransfer dao = new StockTransfer().dao();

	/**
	 * 表名称
	 */
	public static final String table_name = "sb_shop_stock_transfer";

	/**
	 * 字段描述：该条数据添加人员is  字段类型：character varying 长度：32
	 */
	public static final String column_createId = "createId";
	/**
	 * 字段描述：该条数据添加时间  字段类型：datetime 长度：0
	 */
	public static final String column_createDate = "createDate";
	/**
	 * 字段描述：该条数据更新人员id  字段类型：character varying 长度：100
	 */
	public static final String column_updateId = "updateId";
	/**
	 * 字段描述：该条数据更新时间  字段类型：datetime 长度：0
	 */
	public static final String column_updateDate = "updateDate";
	
	/**
	 * 字段描述：主键 字段类型：character varying 长度：32
	 */
	public static final String column_ids = "ids";
	/**
	 * 字段描述：交接表ids 字段类型：character varying 长度：32
	 */
	public static final String column_handoverIds = "sss_handoverIds";
	/**
	 * 字段描述：产品ids 字段类型：character varying 长度：32
	 */
	public static final String column_productIds = "productIds";
	/**
	 * 字段描述：类别ids 字段类型：character varying 长度：32
	 */
	public static final String column_typeIds = "typeIds";
	/**
	 * 字段描述：上班数量（交接班时初始数量） 字段类型：float
	 */
	public static final String column_initialQuantity = "initialQuantity";
	/**
	 * 字段描述：使用数量 字段类型：float
	 */
	public static final String column_useNum = "useNum";
	/**
	 * 字段描述：入库数量字段类型：float
	 */
	public static final String column_storage = "storage";
	/**
	 * 字段描述：出库数量 字段类型：float
	 */
	public static final String column_outgoing = "outgoing";
	/**
	 * 字段描述：账面库存 字段类型：float
	 */
	public static final String column_bookInventory = "bookInventory";
	/**
	 * 字段描述：实际盘点 字段类型：float
	 */
	public static final String column_physicalInventory = "physicalInventory";
	/**
	 * 字段描述：差异 字段类型：float
	 */
	public static final String column_difference = "difference";
	/**
	 * 字段描述：差异原因 字段类型：varchar
	 */
	public static final String column_differenceCause = "differenceCause";
	/**
	 * 字段描述：交接时间 字段类型：float
	 */
	public static final String column_date= "date";
	
	/**
	 * sqlId : sb.stockTransfer.column 描述：查询用户，自定义字段和值
	 */
	public static final String sqlId_column = "sb.stockTransfer.column";
	/**
	 * sqlId : sb.stockTransfer.column 描述：查询用户，自定义字段和值
	 */
	public static final String sqlId_selByDateAndOrganIds = "sb.stockTransfer.selByDateAndOrganIds";
	/**
	 * sqlId : sb.stockTransfer.column 描述：查询用户，自定义字段和值
	 */
	public static final String sqlId_selAll = "sb.stockTransfer.selAll";
	
	/**
	 * sqlId : sb.stockTransfer.column 描述：查询用户，自定义字段和值
	 */
	public static final String sqlId_selByproIdsAndHanIds = "sb.stockTransfer.selByproIdsAndHanIds";
	
	/**
	 * 描述：分页Select
	 */
	public static final String sqlId_splitPageSelect = "sb.stockTransfer.splitPageSelect";

	/**
	 * 描述：分页from
	 */
	public static final String sqlId_splitPageFrom = "sb.stockTransfer.splitPageFrom";
	
	/**
	 * 关联查询获取类型类别
	 * @return
	 */
	public Code getType(){
		return Code.cacheGet(this.getStr(StockTransfer.column_typeIds));
	}
	/**
	 * 关联查询获取交接表
	 * @return
	 */
	public StockHandover getStockHandover(){
		return StockHandover.dao.findById(this.getStr(column_handoverIds));
	}

}
